package com.cloud.salon.common.base.response;

import lombok.Data;

/**
 * @Description 通用返回數據格式
 * @Author wolf--LZH
 * @CreateDate 2019/4/9 0009 下午 8:45
 */
@Data
public class Res<T> {

    private T data;
    private String msg;
    private Integer status;
    private Integer currentPage;
    private Integer pageSize;
    private Integer totalPage;
    private Integer totalCount;

    public Res() {
    }

    public Res(Integer status, String msg) {
        this.msg = msg;
        this.status = status;
    }

    public Res(Integer status, String msg, T data) {
        this.data = data;
        this.msg = msg;
        this.status = status;
    }

    public Res(Integer status, String msg, T data, Integer currentPage, Integer pageSize, Integer totalPage, Integer totalCount) {
        this.data = data;
        this.msg = msg;
        this.status = status;
        this.currentPage = currentPage;
        this.pageSize = pageSize;
        this.totalPage = totalPage;
        this.totalCount = totalCount;
    }
}
